Benefits:

  • improved usability
  • less wasted bandwith, when browsing to deeply nested items
  • cleaner than existing implementations that require all menu items to be set as expanded in every page(see sp_ajax)

My idea:

The new feature should be built upon the current system, which would serve as fallback in case of missing javascript support or outdated browser.

The javascript should add clickable widgets (a plus sign or an arrow) on the left of menu items with children, ie. the menus we want to expand/collapse.

When the witdget is clicked it should get the children with an AJAX request, when it's clicked again it should just hide them.

When an expandable menu item is clicked, then it would behave like it does now: the appropriate page is loaded and all his children are shown.

Comments

Crell’s picture

Status: Active » Closed (duplicate)

Yep, great feature. There's already several contrib modules that offer it. You can take your pick which one you want to use, as I've not tried any of them yet.

Egon Bianchet’s picture

Status: Closed (duplicate) » Active

Yes, but as I said, I think the approach by sp_ajax isn't good (ie. loading an expanded menu tree and then collapsing it by css) because you can see the original menu flashing for a second while loading.

I completely missed activemenu, which uses the same technique I suggested. Isn't something like that worth cosidering for inclusion in core, as an usability improvement?

chx’s picture

This is being worked on as an SoC project.

bradlis7’s picture

+1 for this

Crell’s picture

Version: x.y.z » 5.x-dev
Status: Active » Closed (duplicate)

Pretty sure this is available in Contrib. If not, then it should be in contrib, not Core. Closing.

queryblitz’s picture

several contrib modules

lol